package com.teach.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;

/**
 * <pre>
 * TODO : 实体类
 * 系统用户
 * ClassName : com.teach.entity.User
 * Author : J.L.Zhou
 * E-Mail : 12020042@qq.com
 * Tel : 15111047708
 * Date : 2020-05-02 10:51
 * Version : 1.0
 */
@TableName("sys_user")
public class User implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 用户编号
     */
    @TableId("USER_ID")
    private Long userId;

    /**
     * 角色编号
     */
    @TableField("ROLE_ID")
    private Integer roleId;

    /**
     * 用户名
	 * 唯一
     */
    @TableField("USER_NAME")
    private String userName;

    /**
     * 用户昵称
     */
    @TableField("USER_NICKNAME")
    private String userNickname;

    /**
     * 用户密码
     */
    @TableField("USER_PASSWORD")
    private String userPassword;

    /**
     * 用户性别
     */
    @TableField("USER_SEX")
    private Boolean userSex;

    /**
     * 用户出生日期
     */
    @TableField("USER_BRITHDATE")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private java.util.Date userBrithdate;

    /**
     * 用户电话
     */
    @TableField("USER_TEL")
    private String userTel;

    /**
     * 用户住址
     */
    @TableField("USER_ADDRESS")
    private String userAddress;

    /**
     * 用户头像
     */
    @TableField("USER_IMG")
    private String userImg;

    /**
     * 用户状态
	 *             默认：0，
	 *             0 - 正常
	 *             1 - 锁定
	 *             n - 更多
     */
    @TableField("USER_STATUS")
    private Integer userStatus;

    /**
     * 用户注册时间
     */
    @TableField("USER_REG_TIME")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
    private java.util.Date userRegTime;

    /**
     * - 无参构造方法
     */
    public User(){}

    /**
     * - 全参构造方法
     */
    public User(Long userId, Integer roleId, String userName, String userNickname, String userPassword, Boolean userSex, java.util.Date userBrithdate, String userTel, String userAddress, String userImg, Integer userStatus, java.util.Date userRegTime){
        this.userId = userId;
        this.roleId = roleId;
        this.userName = userName;
        this.userNickname = userNickname;
        this.userPassword = userPassword;
        this.userSex = userSex;
        this.userBrithdate = userBrithdate;
        this.userTel = userTel;
        this.userAddress = userAddress;
        this.userImg = userImg;
        this.userStatus = userStatus;
        this.userRegTime = userRegTime;
    }

    /**
     * - 主键构造方法
     */
    public User(Long userId){
        this.userId = userId;
    }


    /**
     * 获取用户编号
     */
    public Long getUserId(){
        return userId;
    }

    /**
     * 设置用户编号
     */
    public User setUserId(Long userId){
        this.userId = userId;
        return this;
    }

    /**
     * 获取角色编号
     */
    public Integer getRoleId(){
        return roleId;
    }

    /**
     * 设置角色编号
     */
    public User setRoleId(Integer roleId){
        this.roleId = roleId;
        return this;
    }

    /**
     * 获取用户名
	 * 唯一
     */
    public String getUserName(){
        return userName;
    }

    /**
     * 设置用户名
	 * 唯一
     */
    public User setUserName(String userName){
        this.userName = userName;
        return this;
    }

    /**
     * 获取用户昵称
     */
    public String getUserNickname(){
        return userNickname;
    }

    /**
     * 设置用户昵称
     */
    public User setUserNickname(String userNickname){
        this.userNickname = userNickname;
        return this;
    }

    /**
     * 获取用户密码
     */
    public String getUserPassword(){
        return userPassword;
    }

    /**
     * 设置用户密码
     */
    public User setUserPassword(String userPassword){
        this.userPassword = userPassword;
        return this;
    }

    /**
     * 获取用户性别
     */
    public Boolean getUserSex(){
        return userSex;
    }

    /**
     * 设置用户性别
     */
    public User setUserSex(Boolean userSex){
        this.userSex = userSex;
        return this;
    }

    /**
     * 获取用户出生日期
     */
    public java.util.Date getUserBrithdate(){
        return userBrithdate;
    }

    /**
     * 设置用户出生日期
     */
    public User setUserBrithdate(java.util.Date userBrithdate){
        this.userBrithdate = userBrithdate;
        return this;
    }

    /**
     * 获取用户电话
     */
    public String getUserTel(){
        return userTel;
    }

    /**
     * 设置用户电话
     */
    public User setUserTel(String userTel){
        this.userTel = userTel;
        return this;
    }

    /**
     * 获取用户住址
     */
    public String getUserAddress(){
        return userAddress;
    }

    /**
     * 设置用户住址
     */
    public User setUserAddress(String userAddress){
        this.userAddress = userAddress;
        return this;
    }

    /**
     * 获取用户头像
     */
    public String getUserImg(){
        return userImg;
    }

    /**
     * 设置用户头像
     */
    public User setUserImg(String userImg){
        this.userImg = userImg;
        return this;
    }

    /**
     * 获取用户状态
	 *             默认：0，
	 *             0 - 正常
	 *             1 - 锁定
	 *             n - 更多
     */
    public Integer getUserStatus(){
        return userStatus;
    }

    /**
     * 设置用户状态
	 *             默认：0，
	 *             0 - 正常
	 *             1 - 锁定
	 *             n - 更多
     */
    public User setUserStatus(Integer userStatus){
        this.userStatus = userStatus;
        return this;
    }

    /**
     * 获取用户注册时间
     */
    public java.util.Date getUserRegTime(){
        return userRegTime;
    }

    /**
     * 设置用户注册时间
     */
    public User setUserRegTime(java.util.Date userRegTime){
        this.userRegTime = userRegTime;
        return this;
    }

	@Override
	public String toString() {
		StringBuilder builder = new StringBuilder();
		builder.append("User [userId=");
		builder.append(userId);
		builder.append(", roleId=");
		builder.append(roleId);
		builder.append(", userName=");
		builder.append(userName);
		builder.append(", userNickname=");
		builder.append(userNickname);
		builder.append(", userPassword=");
		builder.append(userPassword);
		builder.append(", userSex=");
		builder.append(userSex);
		builder.append(", userBrithdate=");
		builder.append(userBrithdate);
		builder.append(", userTel=");
		builder.append(userTel);
		builder.append(", userAddress=");
		builder.append(userAddress);
		builder.append(", userImg=");
		builder.append(userImg);
		builder.append(", userStatus=");
		builder.append(userStatus);
		builder.append(", userRegTime=");
		builder.append(userRegTime);
		builder.append("]");
		return builder.toString();
	}
}
